perm filename STEREO.DOC[SYS,HE] blob sn#144669 filedate 1975-02-07 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00006 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	
C00005 00003	
C00009 00004			*** AUTOMATIC FEATURE EXTRACTION ***
C00014 00005	
C00018 00006	
C00022 ENDMK
C⊗;

	This is  the documentation, such  that it  is, of the  stereo
program.   The program consists of the  following programs and files:
[all files are one SYS,HE unless otherwise noted]

PDP-10 Program:

MOVEC	is the main program. It requires:

    CORC    		is the guts of the automatic feature extractor
    DPYSUB.HDR[1,PDQ] 	calls the Quam display routines
    INTERF.HDR		calls the PDP-11 interface routines 
			(documented elsewhere)
    HELIB.REL[1,3]	is the hand/eye library
			Library routines used are:
			GIOWN, PICINI, JOBOK, CANMAIL,OVERL,PICRD,DDVID
			SENDCOM

PDP-11 Program:

MON11C			main program contains command decoder
			It requires:

    STRUCT		the data structure routines
    TRACK		the feature tracking routine	
    FEATUR		the feature extractor
    DEBUG		debugging routines (not currently enabled)
    CATCH		a trap catcher (for debugging)
    CORREL[11,SYS]	links to the SPS-41 correlation routines
                        in place of CORREL one can use
    COR11		which does the correlation on the 11, with
			the same interface.  MON11D currently is
			assembled with this option
    VARIAN		the variance operator for FEATUR
    GRAD		the Sobel gradient operator for FEATUR


       To run  this  mess you  must first  load the  PDP-11 with  the
proper monitor.  This is done by typing (at the 10)

	R 11TTY
	NMON11C<cr>	or NMON11D<cr>
	S<cr>

       The number  of words of  free storage should  type out  on the
PDP-11  the first time called,  followed by the  version.  Thereafer,
the version will type  each time it is  restarted.  If anything  else
types you are in trouble.   Read the interface documentation for more
details or see BO. 

	When MOVEC is  started, it will  restart the PDP-11,  just in
case. If DDVID is available, the program will next ask:

DEBUG?  a Y  allows  debugging  questions  in the  remainder  of  the
    program.   Note that,  except to  continue from debugging  pauses,
    all input must  terminate with a carriage  return.  NO  responses
    are indicated by typing anything other than Y.  If not DEBUG, the
    program  will  not talk  as much  and  run to  completion without
    bothering you  for much  more information.   In the  case of  all
    debugging flags,  if you do not  respond with Y,  or the question
    was not asked, the flag is false. 

If DDVID  available and DEBUG, DDVID images 2  and 3 are erased.  The
program then types:

TYPE NAME OF FILE

       Give it the name of the picture file you  want to process.  If
it finds  it, you will be told the number  of images to be processed.
Then the first  image will be sent  to DDVID for  display as image  2
(lower right quadrant of display).  Whenever a DDVID display is to be
sent,  it will not be sent if DDVID  is flagged as not available.  If
DDVID was previously available but cannot be accessed  at the moment,
a  message will  be typed  and  you can  either wait,  or  have DDVID
flagged unavailable and continue. 

       If "NO  ROOM FOR PICTURE  1 -  NEED xxx  WORDS" is typed,  the
PDP-11 cannot  hold the entire image,  try a smaller  picture or make
the 11 code shorter.  

If DEBUG then the program types:

USE  VARIANCE? a  Y  causes the  automatic  feature extractor  to  be
    called.  Otherwise the manual feature marking routine is called. 
    It uses keyboard commands to set the center of a cursor  over the
    features.  The commands are:

	↑	move cursor up by an increment
	↓	move cursor down	"
	←	move cursor left	"
	→	move cursor right	"
	↔	switch increment between 2 and the cursor width
		(starts as the cursor width)
	M	coordinates of cursor center stored as feature
	E	exit from this routine
		*** AUTOMATIC FEATURE EXTRACTION ***

       If automatic feature extraction was requested, and DEBUG, then
the program will type the following questions:

    DEBUG VARIANCE?		sets debugging flag DEB
    DEBUG CORNER FINDER?	sets debugging flag CDEBUG
    DEBUG OPERATOR?		sets debugging flag SOB

       The  feature extraction  control  block  is  sent to  the  11,
possibly resulting in  the error message "NO ROOM FOR FEATURE BLOCK".
The 10  and the  11  then enter  an interactive  phase where  the  11
applies the  variance operator and,  when windows with  an acceptable
variance  are found, applies the  gradient operator to  them.  The 10
processes the  gradient  output to  produce the  features.   See  the
interface documentation for details on this interaction. 

If "ERROR= xxx" is typed, the interface got error number xxx.

If  "11 TIMED OUT - x" is typed, the 11 program is looping.  You will
probably have to restart.

       Most debugging display output in this program  is handled by a
couple of general  purpose routines.  One overlays the outline of the
current window on the DDVID  display (either image 2, lower left,  or
image 3, lower right) and displays values.   When a D is typed out, a
debugging routine  is waiting for any character to be typed before it
continues (no carriage return  is required).  Certain  characters may
cause   additional  actions.     Unless  noted  otherwise   with  the
description of  some  output,  typing Q  causes  the  debugging  flag
controling this output to be cleared.  Typing  C causes a lower level
debugging flag to be  set (in some cases).  Typing a digit 1-9 causes
this output point  to be skipped  that many  times before it  outputs
again. 

       If DEB  is set, each  application of the variance  operator is
displayed  along with the  score, titled  "VARIANCE: SCORE =  ".  The
lower level flag is SOB. 

       If SOB is  set, each application  of the gradient operator  is
displayed, with a point  showing the current location, along with the
magnitude, direction vector, and direction number, titled "SOBEL: ". 
There is no lower level flag. 

       If CDEBUG is set the 10 feature extraction code will type out,
without  pausing, various information as  it runs.  It  can also dump
information on disk file MOVE.DBG except the current version  of CORC
has  this code  commented out.   In  addtion, each  feature found  is
displayed,  with  the title  "FEATURE".    Only the  character  Q has
special effects here. 

       Be warned that the code for handling the case where the entire
list of features found does not fit in the 11 has never been tried. 

       After all features have been found, and duplicates eliminated,
the time  used will be typed.  If DEBUG,  all the feature points will
be displayed, with numbers, and the program will type:

EDIT?  If you reply Y, you will be  allowed to delete features you do
   not  want the program  to process.   This is important  if a noisy
   picture has produced features around the edges of the image  as it
   may not all fit  in the 11.  You will be asked  for the numbers of
   the features to be deleted, one at a time, and the display will be
   updated after each deletion.  A null number will cause termination
   of this loop. 

		*** end of automatic feature extraction ***

       After the  list  of features  has been  obtained, the  program
calculates  the rectangle  just enclosing  the  portion of  the image
needed to process these features  and repacks the first image in  the
11 to this  size, hopefully allowing room  for the other image.   The
size  of the other image  is calculated and space  is reserved for it
and the correlation data block is transmitted to the 11.  Many out of
space errors can occur through here. 

Then the program asks:

DEBUG  TRACKING? a  Y  here will  allow  further debugging  questions
    during the main loop, below. Otherwise, the main loop will run to
    completion with no pauses. 

       The  program  then  enters the  main  processing  loop,  going
through  it  once  for  each  image,  other  than  the first,  to  be
processed.  


		*** main tracking loop ***

       The image number is typed out. Then, if tracking debugging was
specified, the program will ask:

    DEBUG MACDIF?	sets debugging flag DEB
    DEBUG CORRELATION?	sets debugging flag DMAC

       If DEB and this  is the last image, then the  current image is
sent to DDVID for image position 3. 

       The program then calls MACDIF, which coordinates the 10 and 11
to  track the  features  in the  current image,  using  a correlation
operator. 

       Again, ERROR  = xxx  indicates an  interface error. This  will
cause an early exit from MACDIF. 

       If DEB,  then the window  will be  overlayed showing the  best
match  in the  current image,  along with the  offset of  the feature
coordinates in the  image from the  first to  the current image,  the
confidence (the difference between the two  best scores as a per cent
of the best - which turns out to be a fairly useless number), and the
best score, all titled "BEST:".  DMAC is the lower level flag. 

       If  DMAC, then  the  window  will be  overlayed  showing  each
application  of  the correlation  operator,  along  with the  current
score, and feature offset, titled "CORREL:".  Q is the only  response
with special effects here. 

       Each pass  of this loop  ends with  the processing time  being
typed out.  

		*** end of tracking loop ***

The program then asks:

DEBUG DEPTH?  a Y here causes lots of  good numbers to be written out
    on disk file DEPTH.DBG by the depth calculation routines. 

       The  program  then  enters the  depth  calculation  loop.    A
tolerance  is   requested,  which  specifies  the  maximum  error  in
calculating the X and  Y coordinates of  the actual feature point  in
the scene.   The processing time  for the depth calculation  is typed
out. 

       Then  both DDVID  images  currently  being displayed  will  be
overlayed with the location of their feature points, which are number
in one  of them.   In  addition, the  program will  type one  line of
information  for  each point,  giving  the  feature number,  the  3-D
coordinates  of the  point  in the  scene, the  depth (from  the lens
center), the minimum (or best) correlation score,  and the confidence
(see above). 

	This loop  is repeated as  ofen as you  wish, so you  can try
difference tolerances.  I have found that .01 is a good number. 

You  are then asked  if there are  more pictures. If  so, the program
returns to the beginning (without restarting the 11).  Otherwise, the
DDVID display is cleared and the program exits.